home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / MacInterface / fonts.icl < prev    next >
Encoding:
Modula Implementation  |  1996-02-22  |  917 b   |  29 lines  |  [TEXT/3PRM]

  1. implementation module fonts;
  2.  
  3. import mac_types;
  4.  
  5. GetFontName :: !Int !{#Char} !Toolbox -> (!{#Char},!Toolbox);
  6. GetFontName fontNum string256 tb = (GetFontName1 fontNum string256 tb, NewToolbox);
  7.  
  8. GetFontName1 :: !Int !{#Char} !Toolbox -> {#Char};
  9. GetFontName1 fontNum string256 t = code (fontNum=W,string256=A0,t=U)(theName=A0){
  10.     instruction 0x2808            ||    move.l    a0,d4
  11.     instruction 0x42A8 0x0004    ||    clr.l    4(a0)
  12.     instruction 0x4868 0x0007    ||    pea        7(a0)
  13.     instruction 0xA8FF
  14.     instruction    0x2044            ||    move.l    d4,a0
  15. };
  16.  
  17. GetFNum :: !{#Char} !Toolbox -> (!Int,!Toolbox);
  18. GetFNum fontName t = code (fontName=R2S,t=O4U)(theNum=W,z=Z){
  19.     instruction 0xA900
  20. };
  21.  
  22. RealFont :: !Int !Int !Toolbox -> (!Bool,!Toolbox);
  23. RealFont fontNum size t = code (fontNum=R2W,size=W,t=U)(is_real_font=D1,z=Z){
  24.     instruction 0xA902
  25.     instruction 0x7000            ||    moveq    #0,d0
  26.     instruction 0x101F            ||    move.b    (sp)+,d0
  27.     instruction 0x2200            ||    move.l    d0,d1    
  28. };
  29.